package com.gui.serialization;

import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONUtil;

import java.util.Date;
import java.util.Map;

public class SerialCatalog {

    private String id;
    private transient String name;
    private int age;
    private Date createTime;
    private Map<String, Object> attribute;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Map<String, Object> getAttribute() {
        return attribute;
    }

    public void setAttribute(Map<String, Object> attribute) {
        this.attribute = attribute;
    }

    @Override
    public String toString() {
        return "SerialCatalog{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", createTime=" + DateUtil.format(createTime, "yyyy-MM-DD hh:mm:ss") +
                ", attribute=" + JSONUtil.toJsonStr(attribute) +
                '}';
    }
}
